<?php
return array(
	'defaultScope' => array(
		'condition' => "object_type = 'Hotel'",
	),
	
	'attributeLabels' => array(
		'title' => '酒店客房名称',
		'star' => '酒店星级',
		'province' => '酒店地址',
		'selectTime' => '上架时间'
	),
	
	'relations' => array(
		'profile' => array(CActiveRecord::HAS_ONE, 'GoodsHotel', 'goods_id'),
	),
	'rules' => array(
		array('star,district,province,city','safe'),
	),
	
	'behaviors' => array(
		'search' => array(
			'class' => 'application.behaviors.SearchBehavior',
			'timeSearch' => 'listing_time',
			'searchModel' => 'HotelSearch'
		),
		'fornt' => array(
			'class' => 'coms.behaviors.FrontBehavior',
			'attributes' => array(
				'title' => 'title',
				'img' => 'thumb',
			),
			'route' => 'mall/hotel/goods'
		),
	),
	'class_id' => Goods::TYPE_HOTEL,
	'_import' => array(
		array('*', 'models.Goods//*'),
		array('*', 'models.goods.activePrice//*'),
	),
);